import request from '@/utils/request'

// 查询知识点列表
export function listKnowledge_points(query) {
  return request({
    url: '/teach/knowledge_points/list',
    method: 'get',
    params: query
  })
}

// 查询知识点列表
export function treeKnowledge_points(query) {
  return request({
    url: '/teach/knowledge_points/tree',
    method: 'get',
    params: query
  })
}

// 查询知识点详细
export function getKnowledge_points(id) {
  return request({
    url: '/teach/knowledge_points/' + id,
    method: 'get'
  })
}

// 新增知识点
export function addKnowledge_points(data) {
  return request({
    url: '/teach/knowledge_points',
    method: 'post',
    data: data
  })
}

// 修改知识点
export function updateKnowledge_points(data) {
  return request({
    url: '/teach/knowledge_points',
    method: 'put',
    data: data
  })
}

// 删除知识点
export function delKnowledge_points(id) {
  return request({
    url: '/teach/knowledge_points/' + id,
    method: 'delete'
  })
}
